Add env flag to accept swift-crypto beta releases - #302
Merged
Conversation
Motivation: Tagged releases can only have other tagged versions in their dependencies. Tagging a package that depends on a swift-crypto beta and swift-certificates requires a swift-certificates release that accepts a swift-crypto beta release. Modifications: Introduce an environement flag that allows swift-certificates to depend on swift-crypto beta releases. Results: Setting an environment flag can widen the upper limit of accepted swift-cryto version to include 5.0.0 beta release.
Lukasa
reviewed
Jun 30, 2026
| // | ||
| // Note: A beta release can only be used if other packages in the dependency tree | ||
| // that have a direct dependency on swift-crypto accept beta releases as well. | ||
| if ProcessInfo.processInfo.environment["SWIFT_CERTIFICATES_ALLOW_SWIFT_CRYPTO_BETA"] == nil { |
Contributor
There was a problem hiding this comment.
Is this intentionally nested?
Contributor
Author
There was a problem hiding this comment.
Yes, the intention was for local dependencies to have precedence. Flipping the comparisons could make this an else if branch.
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] != nil {
// use local repos
} else if ProcessInfo.processInfo.environment["SWIFT_CERTIFICATES_ALLOW_SWIFT_CRYPTO_BETA"] != nil {
// accept swift-crypto beta releases
} else {
// default dependency range
}
Lukasa
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Tagged releases can only have other tagged releases in their dependencies. Tagging a package that depends on a swift-crypto beta and swift-certificates requires a swift-certificates release that accepts a swift-crypto beta release.
Modifications
Introduce an environment flag that allows swift-certificates to depend on swift-crypto beta releases.
Results
Setting an environment flag can widen the upper limit of accepted swift-cryto version to include 5.0.0 beta release.